/**
 * Copyright (c) 2015-2030 by Beijing Yanlight Co., Ltd.
 * All rights reserved.
 */
package com.yanlight.app.dal.dao;

import java.util.Collection;
import java.util.List;

import com.yanlight.app.dal.dto.AdminPageQuery;
import com.yanlight.app.dal.entity.Admin;

/**
 * @author haolw
 * @time 2017/08/18
 */
public interface UserDAO {

    Admin findById(Integer userId);

    Admin findByEmail(String email);

    List<Admin> findByFuzzyEmail(String email);

    List<Admin> findByIds(Collection<Integer> userIds);

    Admin findBySubId(Integer userId);

    Admin findLogin(String userName, String password);

    Admin findByEmailOrPhone(String email, String phone);

    Admin findByEmailAndPwd(String name, String password);

    Admin findByPhoneAndPwd(String name, String password);

    Admin findByIdAndPwd(Integer userId, String password);

    List<Admin> find(AdminPageQuery query);

    int count(AdminPageQuery query);

    int save(Admin admin);

    void updateStatus(Integer userId, Integer status);

    void updatePassword(Integer id, String password);

    void deleteByCompanyId(Integer id);

}
